package drg_group.beijing_2022.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.beijing_2022.Base;
import drg_group.beijing_2022.MedicalRecord;
import drg_group.beijing_2022.DRG.MDCF_DRG;

public class FD2 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={};
        String[] adrg_zd1={};
        String[] adrg_ss={"35.3100x001","35.3400x001","35.3400x003","35.3400x004","35.3400x006","35.3901","35.4100x001","35.4100x002","35.4101","35.4200x002","35.4200x005","35.4200x006","35.4200x007","35.4200x008","35.4201","35.5000","35.5100x001","35.5100x002","35.5100x003","35.5100x004","35.5100x005","35.5101","35.5300x001","35.5300x003","35.5301","35.6000","35.6100x001","35.6101","35.6102","35.6201","35.6300x002","35.7000","35.7100x002","35.7100x003","35.7100x004","35.7100x005","35.7100x007","35.7100x008","35.7100x009","35.7100x010","35.7101","35.7200x001","35.7200x002","35.7201","35.8100x005","35.8100x006","35.8200x006","35.8200x008","35.8200x009","35.8200x010","35.8200x011","35.8200x012","35.8200x013","35.8201","35.8300x004","35.8300x005","35.8301","35.8302","35.8303","35.8304","35.8305","37.1000x004","37.1000x008","37.1100x004","37.1100x006","37.1100x008","37.1100x009","37.1101","37.1102","37.1103","37.1104","37.1200x005","37.1200x008","37.1200x009","37.1200x010","37.1200x011","37.1201","37.1202","37.1203","37.1204","37.3100x006","37.3101","37.3102","37.3103","37.3104","37.3300x008","37.3300x013","37.3300x014","37.3300x015","37.3300x022","37.3300x023","37.3300x027","37.3300x028","37.3304","37.3305","37.3307","37.3502","37.3600x001","37.3600x005","37.3600x007","37.3600x008","37.3704","37.4100","37.4900x001","37.4900x002","37.4900x005","37.4900x007","37.4900x014","37.4900x015","37.4900x016","37.4901","37.4902","37.4903","37.9000x001","37.9100","38.3400x003","38.3500x002","38.4500x017","38.8500x001","38.8500x012","38.8500x013","38.8500x019","38.8505","39.2100x001","39.2100x003","39.2100x004","39.2100x005","39.2100x006","39.2100x007","39.2101","39.2102","39.4903","39.4904"};
        String[] adrg_ss1={};
        
        if (true && record.ssList!=null && record.ssList.length>0 && Base.contains(adrg_ss,record.ssList[0])){
            Base.groupMessages.putMessage(record.Index,"符合FD2入组条件，匹配规则：主手术匹配");
                
            if (MDCF_DRG.FD23_group(record)){
                return "FD23";
            }
    
            if (MDCF_DRG.FD25_group(record)){
                return "FD25";
            }

            return "FD2";
        }else{
            return "";
        }
    }
}

